//
//  Activity.m
//  UI12豆瓣大项目
//
//  Created by dllo on 15/10/28.
//  Copyright © 2015年 蓝鸥科技. All rights reserved.
//

#import "Activity.h"

@implementation Activity


- (void)dealloc
{
    [_image release];
    [_ownerDic release];

    [_content release];
    [_end_time release];
    [_title release];
    [_begin_time release];
    [_address release];
    [super dealloc];
}

-(void)setValue:(id)value forUndefinedKey:(NSString *)key{
    if ([key isEqualToString:@"owner"]) {
        self.ownerDic = value;
    }
    if ([key isEqualToString:@"id"]) {
        self.movieId222 = value;
    }
}


-(void)encodeWithCoder:(NSCoder *)aCoder{
    [aCoder encodeObject:self.begin_time forKey:@"begin_time"];
    [aCoder encodeObject:self.end_time forKey:@"end_time"];
    [aCoder encodeObject:self.address forKey:@"address"];
    [aCoder encodeObject:self.title forKey:@"title"];
    [aCoder encodeObject:self.category_name forKey:@"category_name"];
    [aCoder encodeInteger:self.participant_count forKey:@"participant_count"];
    [aCoder encodeInteger:self.wisher_count forKey:@"wisher_count"];
    [aCoder encodeObject:self.image forKey:@"image"];
    [aCoder encodeObject:self.content forKey:@"content"];
    [aCoder encodeObject:self.ownerDic forKey:@"ownerDic"];
}

-(instancetype)initWithCoder:(NSCoder *)aDecoder{
    if ([super init]) {
        self.begin_time = [aDecoder decodeObjectForKey:@"begin_time"];
        self.end_time = [aDecoder decodeObjectForKey:@"end_time"];
        self.address = [aDecoder decodeObjectForKey:@"address"];
        self.title = [aDecoder decodeObjectForKey:@"title"];
        self.category_name = [aDecoder decodeObjectForKey:@"category_name"];
        self.participant_count = [aDecoder decodeIntegerForKey:@"participant_count"];
        self.wisher_count =[aDecoder decodeIntegerForKey:@"wisher_count"];
        self.image = [aDecoder decodeObjectForKey:@"image"];
        self.content = [aDecoder decodeObjectForKey:@"content"];
        self.ownerDic = [aDecoder decodeObjectForKey:@"ownerDic"];
    }
    return self;
}

@end
